package com.work2.service;
import com.work2.bean.Users;
import com.work2.dao.UsersDaoImpl;

import java.util.List;
public class UsersServiceImpl implements UsersService{
    static UsersDaoImpl usersDao = new UsersDaoImpl();

    @Override
    public boolean addUser(Users users) throws Exception {
        return usersDao.addStu(users)>0?true:false;
    }

    @Override
    public List<Users> findUser() throws Exception {
        return usersDao.findUser();
    }

    @Override
    public boolean delUser(int id) throws Exception {
        return usersDao.delUser(id)>0?true:false;
    }

    @Override
    public List<Users> findMove(int id, String username, String usepwd) throws Exception{
        return usersDao.findMove(id,username,usepwd);
    }

    @Override
    public boolean uptUser(Users users, int id) throws Exception {
        return usersDao.uptUser(users,id)>0?true:false;
    }
}